package com.example.springboot.service;

import com.example.springboot.common.Page;
import com.example.springboot.common.Result;
import com.example.springboot.dto.SolCenterDTO;
import com.example.springboot.dto.SolutionAllDTO;
import com.example.springboot.dto.SolutionDTO;
import com.example.springboot.dto.SolutionInfoDTO;
import com.example.springboot.entity.Solution;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

public interface ISolutionService extends IService<Solution> {
    Result insert(Solution solution);
    Result findByGuide(Integer guide_id);
    List<Solution> findByUserId(Integer userId);
    List<SolCenterDTO> getCenter(Integer userId);
    int getViewByUser(Integer userId);
    SolutionInfoDTO getDetailById(Integer id);
    HashMap<String, Page> findAllBySearch(Integer pageNum, Integer pageSize, String words);
    Integer updateView(Integer id);
    List<SolutionAllDTO> getSolutionHomes(Integer userId);
    boolean removeSolutionInfo(Integer id);
    boolean removeSolutionByGuide(Integer guideId);
    Result toPublish(Integer id);
    Result toUnPublish(Integer id);
    Result adminGetPublished(int pageNum, int pageSize, Integer userId, String name, String sortWay);
    Result adminGetToExamine(int pageNum, int pageSize, Integer userId, String name);
    Result manageSolution(Solution solution);
    void export(Integer guideId, HttpServletResponse response);
    Result recoverySolution(Solution solution);
}
